import 'package:ble_helper_plugin/library.dart';
import 'package:bluetooth_protocols_parser_plugin/library.dart';
import 'package:get/get.dart';

class ProtocolService extends GetxService {
  // 协议服务
  static ProtocolService get to => Get.find();

  // 蓝牙管理助手
  late BluetoothConnectHelper bluetoothConnectHelper;

  // 初始化
  init({bool isLorin = true}) {
    if (isLorin) {
      // 蓝牙助手
      bluetoothConnectHelper = BluetoothConnectHelper(
        [LorinBluetoothUuidAdapter()],
      );
    } else {
      // 蓝牙助手
      bluetoothConnectHelper = BluetoothConnectHelper(
        [HuariBluetoothUuidAdapter()],
      );
    }
  }
}
